//
//  OrderDetailInfo.m
//  HWZB
//
//  Created by 许成雄 on 2017/5/4.
//  Copyright © 2017年 wonders. All rights reserved.
//

#import "OrderDetailInfo.h"

@implementation OrderDetailInfo


//"refreshTime": "2017-05-03 20:32:22",
//"state": "0",
//"state2": null,
//"payModel": "1",
//"osModel": "1",
//"modelId": "1",
//"accountId": null,
//"tradeNo": null,
//"image1": null,
//"image2": null,
//"image3": null,
//"image4": null,
//"image5": null,
//"modelImage1": null,
//"modelImage2": null,
//"modelImage3": null,
//"modelImage4": null,
//"modelImage5": null,
//"oil": null,
//"card": null,
//"phone": null,
//"loginid": null,
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
            @"loginId" : @"loginid",
            @"orderId" : @"id",
            @"order" : @"order",
            @"productId" : @"productId",
            @"productName" : @"productName",
            @"productNum" : @"productQuantity",
            @"productPrice" : @"productPrice",
            @"discountPrice" : @"discountPrice",
            @"payPrice" : @"payPrice",
            @"state" : @"state",
            @"state2" : @"state2",
            @"refreshTime" : @"freshTime",
            @"payModel" : @"payModel",
            @"osModel" : @"osModel",
            @"modelId" : @"modelId",
            @"accountId" : @"accountId",
            @"tradeNo" : @"tradeNo",
            @"imageUrl" : @"image1",
            @"imageUrl2" : @"image2",
            @"imageUrl3" : @"image3",
            @"imageUrl4" : @"image4",
            @"imageUrl5" : @"image5",
            @"packageImageUrl" : @"modelImage1",
            @"packageImageUrl2" : @"modelImage2",
            @"packageImageUrl3" : @"modelImage3",
            @"packageImageUrl4" : @"modelImage4",
            @"packageImageUrl5" : @"modelImage5",
            @"oil" : @"oil",
            @"card" : @"card",
            @"phone" : @"phone",
             };
}

+ (NSValueTransformer *)orderIdJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)accountIdJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)loginIdJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)productIdJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)productNumJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)stateJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)discountPriceJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)productPriceJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)payPriceJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)payModelJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)osModelJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)modelIdJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}


@end
